/*
 * @Author: yanjikun
 * @Date: 2022-05-12 11:47:05
 * @LastEditors: yanjikun
 * @LastEditTime: 2022-05-12 16:10:54
 * @Description: file content
 */

import { descriptionsProps } from 'ant-design-vue/lib/descriptions'
import { ExtractPropTypes, PropType } from 'vue'
import BasicDescriptions from '..'
import { DescriptionsConfig } from './types/descriptions'

export const basicDescriptionsProps = {
  ...descriptionsProps(),
  /**配置项 */
  config: {
    type: Array as PropType<DescriptionsConfig[]>,
    default: () => [],
  },
  /**显示的数据 */
  fields: {
    type: Object as PropType<Recordable>,
    default: () => ({}),
  },
}

export type BasicDescriptionsProps = Partial<ExtractPropTypes<typeof basicDescriptionsProps>>

export type BasicDescriptionsInstance = InstanceType<typeof BasicDescriptions>
